package com.coderg.gmall.webList.controller;

import com.coder.gmall.list.feign.ListFeignClient;
import com.coderg.gmall.model.list.SearchParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * <p>
 * 产品列表接口
 * </p>
 *
 */
@Controller
public class ListController {

    @Autowired
    private ListFeignClient listFeignClient ;

    /**
     * 列表搜索
     * @param searchParam
     * @return
     */
    @GetMapping("/list.html")
    public String search(SearchParam searchParam, Model model) {
       // TODO  需要将参数 封装成searchParam
        // Result<Map> result = listFeignClient.list(searchParam);
        // model.addAllAttributes(result.getData());
        return "list/index";
    }
}
